home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
'92_HACK
/
IR_MAN_
/
CD_ROM.H
< prev
next >
Wrap
Text File
|
1992-06-07
|
2KB
|
89 lines
/* Some constants, from the CD SC Developer's Guide chapter 7 */
#define TRACKADDR 2
#define STEREO 9
#define INPROGRESS 0
#define MSFADDR 1
/* Some commands, from the CD SC Developer's Guide chapter 7 */
#define APLAY 104
#define ASTOP 106
#define ASTATUS 107
#define APAUSE 105
#define ASTATUS 107
#define ASCAN 108
#define csReadQ 101
/* The resource ID I use for my error dialog */
#define errorID 128
struct AudioStateStruct {
Byte aStatusFlags;
Byte playMode;
Byte controlField;
Byte absMinBCD;
Byte absSecBCD;
Byte absBlkBCD;
};
typedef struct AudioStateStruct AudioStateStruct;
typedef struct AStatusRec {
ParamBlockHeader
short ioRefNum;
short csCode;
struct {
Byte audioStatus;
Byte playMode;
Byte cntlField;
Byte minutes;
Byte seconds;
Byte frames;
} csParam;
} AStatusRec;
typedef struct AScanRec {
ParamBlockHeader
short ioRefNum;
short csCode;
struct {
short commandType;
Byte addr[4];
short direction;
} csParam;
} AScanRec;
typedef struct ReadQRec {
ParamBlockHeader
short ioRefNum;
short csCode;
struct {
Byte cntlField;
Byte track;
Byte index;
Byte trackMinutes;
Byte trackSeconds;
Byte trackFrames;
Byte discMinutes;
Byte discSeconds;
Byte discFrames;
} csParam;
} ReadQRec;
/* prototype function declarations. */
short Decimal2BCD(short n);
short BCD2Decimal(short n);
OSErr AStop(short, short);
OSErr APlay(short, short);
OSErr Play(short, short);
short GetDrvRefNum(short);
OSErr APause(short state, short refNum);
OSErr CDEject(short ioRefNum);
OSErr AScan(short state, short refNum);
pascal OSErr AStatus(short ioRefNum, AudioStateStruct *aState);
pascal OSErr GetCurrTrack(short ioRefNum, short * Track);
OSErr ATrackSkip(short state, short refNum);